package com.shang.spring.aop.impl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {

        //创建spring的IOC容器
        ApplicationContext ctx = new ClassPathXmlApplicationContext("aop-Context.xml");
        //从IOC容器中获取bean的实例
        AtithCalculator atithCalculator = ctx.getBean(AtithCalculator.class);
        //使用bean
        int result = atithCalculator.add(3, 6);
        System.out.println(result);

    }

}
